import store from '@/store'
export default {
  inserted(el, binding) {
    // 获取后台返回的权限按钮标识[数组]
    const points = store.state.user.userInfo.roles.points
    // 判断指令的绑定值是否在权限按钮数组中,如果不在,删掉这个按钮节点
    if (!points.includes(binding.value)) el.parentNode.removeChild(el)
  }
}
